home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14573 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: news.mindspring.com!usenet
  2. From: rudd@mindspring.com (Justin Rudd)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Visual C++ help needed!!!!(please)
  5. Date: Mon, 01 Apr 1996 01:20:53 GMT
  6. Organization: MindSpring Enterprises
  7. Message-ID: <4jnb8f$18u8@mule2.mindspring.com>
  8. References: <4jn1cn$7vo@crash.microserve.net>
  9. Reply-To: rudd@mindspring.com
  10. NNTP-Posting-Host: rudd.mindspring.com
  11. X-Newsreader: Forte Free Agent v0.55
  12.  
  13. ada105@psu.edu (Alexander Achey) wrote:
  14.  
  15. >    Hi all,
  16. >    I'm attempting to write a Visual C++ program in which I am making it
  17. >come up with schedules of college courses.  I use a modal dialog box
  18. >to get some information from the user and then I need to have it put
  19. >this data somewhere I can use it after the box is closed.  I tried
  20. >putting the variables under the public part of the document class, but
  21. >I can't seem to use the GetDocument() function from the dialog box.
  22. >Is there any other way to get access to the document's member
  23. >functions or is there a better way to do this?  i tried declaring this
  24. >as a global variable, but I really don't want to do that.  Besides, I
  25. >keep getign redinifition errors when I do that.  I'd really
  26. >apprecitate it if anyone could give me any kind of help.
  27.  
  28. In your dialog class have a member function that accepts a pointer to
  29. a CDocument.
  30.  
  31. void CMyDialog::SetDocPtr(CMyDoc* pDoc)
  32. {
  33.     m_pDoc = pDoc;
  34. }
  35.  
  36.  
  37. Justin Rudd
  38. rudd@mindspring.com
  39. =======================================
  40. It'll work...trust me ;-)
  41. =======================================
  42.  
  43.  
  44.